/**
 * @author of2470
 *@date 2017/4/26
 *@description
 */

if (!window._babelPolyfill) {
  require("babel-polyfill");
}
import * as React from "react";
import { render } from "react-dom";
import { StoreProvider } from "iflux2";
import AppStore from "./store";
import PadManageMain from "./component/pad-advertising";
import { setCookieHash } from "x-site-util";

declare let window: any;

@StoreProvider(AppStore)
export default class PadManage extends React.Component<any, any> {
  componentDidMount() {
    //建站是否升级中
    if (!window.isUpdating) {
      this.props.store.getPageTypeInfo();
      this.props.store.getPlatformBtnList();
      this.props.store.getDomainInfo();
      //把角色的hash值放在cookie里，便于建站返回控制台
      setCookieHash();
    }
  }

  render() {
    return (
      <div className="page-manage">
        <PadManageMain />
      </div>
    );
  }
}
